<script>
    function grantparent(params) {
        this.name='grantparent'
        // this.card='visa'
    }
    Parent.prototype = new grantparent()
    function Parent () {
        this.lastName="张"
    }
    Child.prototype = new Parent() 
    function Child (){
        this.name='张三'
        this.age=18
    }
    const c=new Child()
    console.log(c.lastName);
    console.log(c.card);

</script>